package com.moodincode.taskcenter.script;


import java.util.Map;

/**
 * js发送ajax请求参数
 * @author moodincode
 */
public class AjaxParam {
    /**
     * 目标的地址
     */
    private String url;
    /**
     * 请求类型,GET,POST,PUT
     */
    private String type;
    /**
     * 数据类型,json,xml,text,html
     */
    private String dataType;
    /**
     * 设置超时时间
     */
    private Integer timeout;
    /**
     * 请求头
     */
    private Map<String,String> header;
    /**
     * 数据入参主体,普通的string,或其他json字符串
     */
    private Object data;
    /**
     * 正常执行回调的方法
     */
    private Object callback;
    /**
     * 成功执行函数
     */
    private Object success;
    /**
     * 失败执行函数
     */
    private Object error;

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getDataType() {
        return dataType;
    }

    public void setDataType(String dataType) {
        this.dataType = dataType;
    }

    public Integer getTimeout() {
        return timeout;
    }

    public void setTimeout(Integer timeout) {
        this.timeout = timeout;
    }

    public Map<String, String> getHeader() {
        return header;
    }

    public void setHeader(Map<String, String> header) {
        this.header = header;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }

    public Object getCallback() {
        return callback;
    }

    public void setCallback(Object callback) {
        this.callback = callback;
    }

    public Object getSuccess() {
        return success;
    }

    public void setSuccess(Object success) {
        this.success = success;
    }

    public Object getError() {
        return error;
    }

    public void setError(Object error) {
        this.error = error;
    }
}
